Imports System.ComponentModel
Imports System.Web.UI

<ToolboxData("<{0}:FifthSample runat=server></{0}:FifthSample>")> Public Class FifthSample
    Inherits System.Web.UI.WebControls.WebControl
    Protected Overrides Sub CreateChildControls()
        Dim txt1 As System.Web.UI.WebControls.TextBox
        Dim txt2 As System.Web.UI.WebControls.TextBox
        Dim stl As New System.Web.UI.WebControls.Style

        stl = New System.Web.UI.WebControls.Style
        stl.ForeColor = Drawing.Color.Red
        stl.Font.Bold = True
        stl.BorderWidth = 12

        txt1 = New System.Web.UI.WebControls.TextBox
        txt1.ID = "Text1"
        txt1.ApplyStyle(stl)
        txt1.Text = "Hello"
        Me.Controls.Add(txt1)

        txt2 = New System.Web.UI.WebControls.TextBox
        txt2.ID = "Text2"
        txt2.Text = "World"
        txt2.ApplyStyle(stl)
        Me.Controls.Add(txt2)


    End Sub
End Class
